package com.carkeeper.subject.feign;

import com.carkeeper.entity.PageResult;
import com.carkeeper.entity.Result;
import com.carkeeper.subject.pojo.Store;
import com.carkeeper.subject.pojo.StoreFull;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(name = "subject")
public interface StoreFeign {
    /**
     * 通过id查询服务商
     * @param id
     * @return
     */
    @GetMapping("/store/findById/{id}")
    public Result<StoreFull> findById(@PathVariable("id") String id);

    /**
     * 带条件分页查询
     *
     * @param map  查询条件
     * @return
     */
    @GetMapping("/store/findPage")
    public Result<PageResult> findPage(@RequestParam Map map);
}
